<jsp:useBean id="idHandler" class="edu.capex.javaee.ssl.Login" scope="request">
    <jsp:setProperty name="idHandler" property="*"/>
</jsp:useBean>
<html>	<head><title>Programmatic Security</title></head>
    <body>		<br/><br/><br/>	<%
        ServletContext context = getServletContext();
        String userName = context.getAttribute("name").toString();
        if (idHandler.authorize(userName)) {
        %><br/>
        <h1 align=center>Enter the Employee Details</h1>
        <form action="/SSL/insertEmployee.jsp" method="POST">
            <table border=4 cellpadding=1 align=center>

                <tr><td>Enter the Employee Name</td>
                    <td><input type="text" name="empname"/></td></tr>
                <tr>
                    <td>Enter the Designation</td>
                    <td><input type="text" name="empdesg"/></td>
                </tr>
                <tr>
                    <td>Enter the Password</td>
                    <td><input type="password" name="emppass"/></td>
                </tr>
                <tr>
                    <td><input type="submit" value="Add Employee"/></td>
                </tr>
            </table>
        </form>
        <%                    } else {
                out.println("<h2>" + "you are Unauthorized to add records" + "</h2>");
                out.println("<a href=viewemployee.jsp>" + "View Employee" + "</a>");
            }
        %>
    </body>
</html>
